#include <QCoreApplication>
#include "sip-server.h"
#include "sip-server-cfg.h"
#include "hk-28181-server.h"
#include <QCryptographicHash>
#include <iostream>

#include "comm-func.h"
int main(int argc, char *argv[])
{
    //QCoreApplication a(argc, argv);

    //设置SIP服务相关参数
    std::string str_sip_id("34020000002000000001");
    std::string str_sip_domain("3402000000");
    std::string str_sip_host("192.168.2.108");
    unsigned short us_sip_port = 35061;
    std::string str_sip_password("12345678");
    hk_gb28181_sip_config_init(str_sip_id.c_str(), str_sip_domain.c_str(), str_sip_host.c_str(), us_sip_port, str_sip_password.c_str());

    //设置流媒体服务器地址
    std::string str_media_server_ip = "192.168.2.124";
    unsigned short us_media_server_port = 10000;
    hk_gb28181_set_media_server_cfg(str_media_server_ip.c_str(), us_media_server_port);

    //启动服务
    hk_gb28181_sip_server_start();

    unsigned int ui_cnt = 1;
    while(true){
        std::this_thread::sleep_for(std::chrono::milliseconds(1000));
        ui_cnt++;
    }

    //return a.exec();

    return 0;
}

